from setuptools import setup
import os

def compile_schemas():
    if not os.path.exists("./data/schemas/fit.schema.xml"):
            return
                
                    os.system("glib-compile-schemas ./data/schemas")

                    compile_schemas()

                    setup(
                            name="folder-icon-tool",
                                version="1.0",
                                    data_files=[
                                                ('share/applications', ['com.github.folder-icon-tool.desktop']),
                                                        ('share/glib-2.0/schemas', ['data/schemas/fit.schema.xml'])
                                    ],
                                        scripts=['bin/folder-icon-tool']
                    )
                                    ]
                    )